package com.meilingcloud.activiti.controller;

import com.meilingcloud.activiti.domain.dto.ActivitiHighLineDto;
import com.meilingcloud.activiti.service.IActivitiHistoryService;
import com.meilingcloud.common.core.domain.AjaxResult;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/activitiHistory")
public class ActivitiHistoryController {

    private final IActivitiHistoryService activitiHistoryService;

    /**
     * 流程图高亮
     */
    @GetMapping("/getHighLine")
    public AjaxResult getHighLine(@RequestParam("instanceId") String instanceId) {
        ActivitiHighLineDto highLine = activitiHistoryService.getHighLine(instanceId);
        return AjaxResult.success(highLine);
    }

}
